<template>
	<div class="grade">
		<view class="greenBg"></view>
		<view class="whiteBg">
			<view class="boxTitle">统一缴费</view>
			<view class="study" @click="study">
				<view class="studyImg img0"></view>
				<view class="studyText">
					<view>{{stu.name}}</view>
					<view>{{stu.sno}}</view>
				</view>
			</view>
		</view>
		
		<view class="whiteBg">
			<view class="boxTitle">单项缴费</view>
			<view v-for="(item,index) in msg" :key="index" class="elseMsg" @click="pay(index)">
				<view class="studyImg" :class="img[index]"></view>
				<text>{{item}}</text>
			</view>
		</view>
		
	</div>
</template>

<script>
	export default {
		data() {
			return {
				stu:[],
				img:["img1","img2","img3","img4","img5","img6"],
				msg:["学费","住宿费","体检费","保险费","课本费","缴费查询"]
			}
		},
		created() {
			this.stu = uni.getStorageSync('stu');
		},
		methods:{
			study(){
				uni.navigateTo({
					url: 'study'
				});
			},
			pay(index){
				if(index == 0){
					uni.navigateTo({
						url: 'onlyStudy'
					});
				}
				if(index == 5){
					uni.navigateTo({
						url: 'query'
					});
				}
				
			}
		}
	}
</script>

<style scoped src="../../static/css/grade.css"></style>
